﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;
using System.Windows.Forms;

namespace DAO
{
    class DataProvider
    {
        public SqlConnection getSqlConnection()
        {
            string connectring = @"Data Source=NTUANXB-PC;Initial Catalog=Test;Integrated Security=True";
            SqlConnection conn = new SqlConnection(connectring);
            try
            {
                conn.Open();
            }
            catch (SqlException e)
            {
                MessageBox.Show("Lỗi kết nối cơ sở dữ liệu");
                MessageBox.Show(e.ToString());
            }
            return conn;
        }

    }
}
